package Views;

import Source.DisplayEditFlight;
import UCM.UCDisplayEditFlight;
import java.awt.FlowLayout;
import javax.swing.JButton;
import javax.swing.JPanel;

/**
 * Blah
 * @author Joshua King
 */
public class ViewDisplayEditFlight extends JPanel {
    protected JButton editFlightButton = new JButton("Edit Flight");
    private final UCDisplayEditFlight UCDisplayEditFlight = new UCDisplayEditFlight(this);
    private DisplayEditFlight model;
    
    public ViewDisplayEditFlight() {
        setLayout(new FlowLayout());
        add(editFlightButton);
        editFlightButton.addActionListener(new AdapterUCCToAL(UCDisplayEditFlight));
    }
    
    public void loadTo(DisplayEditFlight model) {
        this.model = model;
    }

    public void setEditFlightVisible() {
        ViewMain.getInstance().updateEditFlight(model.getStr());
    }
}
